From c44f6b31725b2142e963536ff0bd6ebcbfea2161 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 27 Nov 2008 11:24:52 +0000 Subject: [PATCH] x86, hpet: check hpet existence Add check on hpet existence which is removed accidentally in previous changeset (18790). Or else BAD PERIOD error can be seen. Signed-off-by: Kevin Tian --- xen/arch/x86/hpet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index d5e84f4ccd..f82221bbe2 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -273,6 +273,9 @@ u64 hpet_setup(void) return hpet_rate; system_reset_latch = system_reset_counter; + if ( hpet_address == 0 ) + return 0; + set_fixmap_nocache(FIX_HPET_BASE, hpet_address); hpet_id = hpet_read32(HPET_ID); -- 2.30.2